package com.mxpio.erp.common.purchase.entity;

import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.mxpio.erp.common.jpa.model.BizOrderLine;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(callSuper=false)
@Entity
@Table(name = "MB_ERP_PURC_INVOICE_LINE")
@Schema(description="采购发票行")
public class PurcInvoiceLine extends BizOrderLine {

	private static final long serialVersionUID = 1L;

	@Column(name = "OUT_STORE_BIZ_NO_")
    @Schema(description = "出库单号")
    private String outStoreBizNo;

    @Column(name = "SALES_BIZ_NO_")
    @Schema(description = "销售提单号")
    private String salesBizNo;

    @Column(name = "OUT_STORE_DATE_")
    @Schema(description = "出库日期")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date outStoreDate;

    @Column(name = "BUY_COMPANY_")
    @Schema(description = "购货单位")
    private String buyCompany;

    @Column(name = "TEXTURE_")
    @Schema(description = "材质")
    private String texture ;

    @Column(name = "SOURCE_PLACE_")
    @Schema(description = "产地")
    private String sourcePlace ;

    @Column(name = "LENGTH_")
    @Schema(description = "长度")
    private String length ;

    @Column(name = "WEIGHT_")
    @Schema(description = "重量")
    private BigDecimal weight;

    @Column(name = "TAX_RATE_")
    @Schema(description = "税率")
    private BigDecimal taxRate ;

    @Column(name = "TAX_PRICE_")
    @Schema(description = "含税单价")
    private BigDecimal taxPrice;

    @Column(name = "UNTAX_PRICE_")
    @Schema(description = "无税单价")
    private BigDecimal untaxPrice;

    @Column(name = "UNTAX_AMOUNT_")
    @Schema(description = "无税金额")
    private BigDecimal untaxAmount;

    @Column(name = "TAX_")
    @Schema(description = "税额")
    private BigDecimal tax;

    @Column(name = "TOTAL_AMOUNT")
    @Schema(description = "价税合计")
    private BigDecimal totalAmount;

}
